package net.zio.kamenriderzioaddon.procedures;

import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.Entity;
import net.zio.kamenriderzioaddon.network.AddonEventBusHandlers;

/**
 * 处理变身键事件的过程类
 *
 * @author QianYunYi
 *
 * 该过程类负责处理玩家按下变身键时的逻辑
 */
public class HenshinkeyProcedure {
	public static void execute(LevelAccessor world, double x, double y, double z, Entity entity) {
		if (entity == null || !(entity instanceof LivingEntity)) {
			return;
		}

		// 使用全局管理器执行变身
		AddonEventBusHandlers.HENSHIN_MANAGER.executeHenshin((LivingEntity) entity);
	}
}